from typing import List
# The Python Standard Modules(Library) and Third Modules(Library)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, ForeignKey, UniqueConstraint

from sqlalchemy import Integer, String, Date,Float,Boolean,TEXT,PickleType

from sqlalchemy.orm import Mapped,mapped_column,relationship,backref


from . import MappedBase


# ================================== 一对多 ================================== #
class Task(MappedBase):
    __tablename__ = 'task'

    def __repr__(self) -> str:
        return f'<Modele Task {self.name}>'

    id:Mapped[int]=mapped_column(primary_key=True, index=True, autoincrement=True, comment='主键id')

    task_name: Mapped[str] = mapped_column(String(50), unique=True, nullable=False, comment='线路名称,系统生成,只能是英文和数组,下划线,算是唯一标识吧')

    name: Mapped[str] = mapped_column(String(20), unique=True,  nullable=False,comment='线路名称,自己命名')




    

    



    






